package com.wp.design.observer.v2;

import com.google.common.eventbus.EventBus;

public class Test {
	public static void main(String[] args) {
		EventBus eventBus = new EventBus();
		Course course = new Course("java设计模式");
		Question question = new Question();
		question.setUserName("何星达");
		question.setContent("如何学习java");
		course.produceQuestion(course,question);
		Teacher t1 = new Teacher("王鹏");
		Teacher t2 = new Teacher("王鹏2");
		eventBus.register(t1);
		eventBus.register(t2);
		Muti muti = new Muti(course,question);
		eventBus.post(muti);
	}
}
